export default {
    data() {
        return {
            isMobile: false,
        };
    },
    created() {
        this.checkIsMobile();
        window.addEventListener('resize', this.checkIsMobile);
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.checkIsMobile);
    },
    methods: {
        checkIsMobile() {
            this.isMobile = window.innerWidth <= 768; // 自定义移动端的屏幕宽度阈值
        },
    },
};